home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 7 / 007.d81 / super keno (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  7KB  |  180 lines

  1. 50 rem    ** s u p e r       k e n o **
  2. 60 rem          for commodore 64
  3. 70 rem      written by max a. chapman
  4. 80 rem    628 ibis lane, reno nv  89503
  5. 90 rem          (702)   747-3306
  6. 95 rem revision 9/26/84
  7. 100 goto620
  8. 110 v=int(rnd(.)*80)+1:ifa%(v)=1then110
  9. 120 a%(v)=1:q=q+1:q$=mid$(str$(q),2)
  10. 130 printleft$(b$,24)tab(25)chr$(156)q$
  11. 140 fori=1to10:ifv<>f(i)thennext:goto210
  12. 150 printleft$(b$,24)tab(25)chr$(158)q$
  13. 160 mt=mt+1:r=1106:ifv>40thenr=1146
  14. 170 l=int(v/10):g=v-(l*10):ifg=0theng=10:l=l-1
  15. 180 t=(l*80)+(g*3)+r:z=250:poket,z:poket+1,z
  16. 190 pokeu+4,17:fori=0to2:forj=50to20step-2:pokeu,i:pokeu+1,j:next:next
  17. 200 t=t+u:d=2:poket,d:poket+1,d:gosub320:pokeu+4,16:goto260
  18. 210 pokeu,15:pokeu+1,15:pokeu+4,17:r=1106:ifv>40thenr=1146
  19. 220 l=int(v/10):g=v-(l*10):m=l+176:z=g+176:ifv<10thenm=160
  20. 230 ifg=0theng=10:l=l-1
  21. 240 t=(l*80)+(g*3)+r:poket,m:poket+1,z:t=t+u
  22. 250 ford=1to7:poket,d:t=t+1:poket,d:t=t-1:next:pokeu+4,16
  23. 260 wt$=str$(wt)
  24. 270 printb$chr$(159)spc(4)"[211]pots:"s;tab(15)"[200]its:"mt;tab(25)"[215]in: $"wt$"[145]"
  25. 280 fori=1to40:next:rem  *****  sets pace of game  *****
  26. 290 e(v)=e(v)+1
  27. 300 ifq<20then110
  28. 310 return
  29. 320 ifs=4andmt=2ors=9andmt=4ors=6andmt=3ors=7andmt=3thenwt=2
  30. 330 ifs=8andmt=4thenwt=3
  31. 340 ifs=7andmt=4ors=4andmt=3ors=5andmt=3thenwt=5
  32. 350 ifs=10andmt=5thenwt=8
  33. 360 ifs=6andmt=4ors=7andmt=5ors=9andmt=5thenwt=10
  34. 370 ifs=8andmt=5thenwt=12
  35. 380 ifs=5andmt=4ors=9andmt=6ors=10andmt=6thenwt=25
  36. 390 ifs=4andmt=4ors=6andmt=5ors=10andmt=7thenwt=50
  37. 400 ifs=5andmt=5ors=7andmt=6ors=8andmt=6ors=9andmt=7ors=10andmt=8thenwt=100
  38. 410 ifs=6andmt=6ors=7andmt=7ors=8andmt=7thenwt=500
  39. 420 ifs=9andmt=8ors=10andmt=9thenwt=1000
  40. 430 ifs=8andmt=8ors=9andmt=9ors=10andmt=10thenwt=5000
  41. 440 return
  42. 450 getpb$:ifpb$=""then450
  43. 460 return
  44. 470 printspc(4)"[171][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][179]";gg$;:return
  45. 480 bs=bs+1
  46. 490 forby=azto35:forbt=bzto10
  47. 500 printtab(by)k$(bt,bs);:by=by+5:next:next:print
  48. 510 printchr$(30)"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"chr$(154):return
  49. 520 h=0:printleft$(b$,24)tab(13)"                   "chr$(145):return
  50. 530 printleft$(b$,24)"  [193]utorun? (y/n)";
  51. 540 gosub450:zx$=pb$:ifzx$<>"y"thenreturn
  52. 550 printleft$(b$,24);:input"  [200]ow many games (1 to 5000)";zy$
  53. 560 zy=val(zy$):zy=int(zy):zz=ga+(zy-1):ifzy>0andzy<=5000thenreturn
  54. 570 printleft$(b$,24)" not acceptable!  try again           "
  55. 580 fori=1to2000:next:goto550
  56. 590 printleft$(b$,24)chr$(156)tab(6)"clear total winnings? (y/n)"
  57. 600 gosub450:tw$=pb$:iftw$<>"y"thenreturn
  58. 610 wn=0:printchr$(19)chr$(18)chr$(129)tab(29)"      ":return
  59. 620 dime(80):dima%(80):u=54272:pokeu-1000,23:fort=utou+24:poket,0:next
  60. 630 gg$="[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]":rem 35 cursor lefts,cursor down
  61. 640 b$="":rem home, rvs, 24 cursor downs
  62. 650 poke53280,8:poke53281,0
  63. 660 poke53281,0:printchr$(147)chr$(18)chr$(129);:fori=0to39:print" ";:next
  64. 670 fori=0to4:printchr$(30)"keno[129]       pick your numbers       keno[129] ";
  65. 680 printchr$(31)"          the more you match,          [129] ";
  66. 690 printchr$(156)"           the more you win            [129] ";
  67. 700 printchr$(150)"                                       [129] ";:next
  68. 710 ifp$="n"orp$="h"thenp$="":goto740
  69. 720 printchr$(158)"       [215]ritten by [205]ax [193]. [195]hapman       "
  70. 730 poke2023,160:poke56295,0:fori=1to4000:next
  71. 740 pokeu+23,0:pokeu+24,15:pokeu+5,0:pokeu+6,120
  72. 750 c=0:s=0:h=0:fori=1to10:f(i)=0:next
  73. 760 q=0:wt=0:forv=1to80:a%(v)=0:next:ga=ga+1:mt=0
  74. 770 printchr$(19)chr$(129)chr$(18)spc(4)"[199]ame:"ga;tab(17)"[212]otal [215]in: $"wn
  75. 780 printchr$(145)chr$(154)chr$(18);
  76. 790 printspc(4)"[176][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][174]";gg$;
  77. 800 printspc(4)"[221] 1[221] 2[221] 3[221] 4[221] 5[221] 6[221] 7[221] 8[221] 9[221]10[221]";gg$;:gosub470
  78. 810 printspc(4)"[221]11[221]12[221]13[221]14[221]15[221]16[221]17[221]18[221]19[221]20[221]";gg$;:gosub470
  79. 820 printspc(4)"[221]21[221]22[221]23[221]24[221]25[221]26[221]27[221]28[221]29[221]30[221]";gg$;:gosub470
  80. 830 printspc(4)"[221]31[221]32[221]33[221]34[221]35[221]36[221]37[221]38[221]39[221]40[221]";gg$;
  81. 840 printspc(4)"[173][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][189]";gg$;
  82. 850 printspc(4)"[176][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][174]";gg$;
  83. 860 printspc(4)"[221]41[221]42[221]43[221]44[221]45[221]46[221]47[221]48[221]49[221]50[221]";gg$;:gosub470
  84. 870 printspc(4)"[221]51[221]52[221]53[221]54[221]55[221]56[221]57[221]58[221]59[221]60[221]";gg$;:gosub470
  85. 880 printspc(4)"[221]61[221]62[221]63[221]64[221]65[221]66[221]67[221]68[221]69[221]70[221]";gg$;:gosub470
  86. 890 printspc(4)"[221]71[221]72[221]73[221]74[221]75[221]76[221]77[221]78[221]79[221]80[221]";gg$;
  87. 900 printspc(4)"[173][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][189]";gg$;
  88. 910 ifp$="k"thenfori=1tos:h=f(i):goto1060
  89. 920 fori=0to238:print"[129] ";:next:poke2023,160:poke56295,8
  90. 930 printleft$(b$,22)chr$(18);:input"      [200]ow many spots (4 to 10)";s$
  91. 940 s=val(s$):s=int(s):ifs>10ors<4then770
  92. 950 pokeu,45:pokeu+1,45:pokeu+4,17:fori=1to65:next:pokeu+4,16
  93. 960 pokeu,0:pokeu+1,0
  94. 970 c=c+1
  95. 980 cc$="th":ifc=1thencc$="st"
  96. 990 ifc=2thencc$="nd"
  97. 1000 ifc=3thencc$="rd"
  98. 1010 c$=str$(c):printchr$(18)spc(1)c$cc$;
  99. 1020 input" [206]umber";h$
  100. 1030 h=val(h$):h=int(h):ifh<1orh>80thengosub520:goto980
  101. 1040 ifh=f(1)orh=f(2)orh=f(3)orh=f(4)orh=f(5)thengosub520:goto980
  102. 1050 ifh=f(6)orh=f(7)orh=f(8)orh=f(9)orh=f(10)thengosub520:goto980
  103. 1060 pokeu,35:pokeu+1,35:d=1:pokeu+4,17:r=1106:ifh>40thenr=1146
  104. 1070 l=int(h/10):g=h-(l*10):m=l+48:z=g+48:ifh<10thenm=32
  105. 1080 ifg=0theng=10:l=l-1
  106. 1090 t=(l*80)+(g*3)+r:poket,m:poket+1,z:t=t+u:poket,d:poket+1,d:pokeu+4,16
  107. 1100 ifp$="k"thenifi=sthen1170
  108. 1110 ifp$="k"thennext:goto1060
  109. 1120 pokeu,0:pokeu+1,0
  110. 1130 printleft$(b$,24)chr$(129)"                    "chr$(145)chr$(145)
  111. 1140 f(c)=h:ifc<sthen970
  112. 1150 gosub530:printleft$(b$,21)chr$(30)spc(2);
  113. 1160 ons-3gosub1340,1360,1380,1400,1420,1440,1460
  114. 1170 printleft$(b$,24)chr$(156)spc(1)"           [199]ood  [204]uck!!              "
  115. 1180 v=rnd(-ti):gosub110
  116. 1190 poke198,0:ifwt>0thenwn=wn+wt:printchr$(18)chr$(19)chr$(129)tab(29)wn
  117. 1200 fori=10to40step5:pokeu+4,17:pokeu,i:pokeu+1,i
  118. 1210 forj=1to100:next:next:pokeu+4,16:pokeu,0:pokeu+1,0:gosub1570
  119. 1220 ifzx$="y"andzz=gathenzx$="":gosub590:tw$="":goto1270
  120. 1230 ifzx$="y"thenprintleft$(b$,24)tab(10)chr$(156)"autorun to game"zz
  121. 1240 ifzx$="y"thenfori=1to1000:next:p$="k":goto1300
  122. 1250 printleft$(b$,24)chr$(150)spc(1)"         g a m e     o v e r         "
  123. 1260 fori=1to500:next
  124. 1270 printleft$(b$,24)spc(1)"[154][146]keep/[146]clear ticket or see [146]numbers/[146]hits"
  125. 1280 fori=1to1900:next
  126. 1290 getp$:ifp$=""then1250
  127. 1300 ifp$="k"thenprintb$tab(21)chr$(159)"0[129] "tab(32)chr$(159)"0[129]   [145]":goto760
  128. 1310 ifp$="n"thengosub1480:gosub1790:goto650
  129. 1320 ifp$="h"thengosub1580:gosub1760:goto650
  130. 1330 goto750
  131. 1340 print" [205]atch: 4=$50           3=$5       "
  132. 1350 printchr$(18)spc(2)"                2=$2               ":return
  133. 1360 print" [205]atch: 5=$100          4=$25      "
  134. 1370 printchr$(18)spc(2)d"                3=$5               ":return
  135. 1380 print" [205]atch: 6=$500          5=$50      "
  136. 1390 printchr$(18)spc(2)"           4=$10     3=$2          ":return
  137. 1400 print" [205]atch: 7=$500          6=$100     "
  138. 1410 printchr$(18)spc(2)"    5=$10       4=$5        3=$2   ":return
  139. 1420 print" [205]atch: 8=$5,000        7=$500     "
  140. 1430 printchr$(18)spc(2)"    6=$100      5=$12       4=$3   "